package com.alibaba.algo.cooperation.usercomponent.service.user;

import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.*;
import com.alibaba.algo.cooperation.usercomponent.vo.res.user.SelectPositionListResponseVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;
import java.util.List;

/**
 * 类SysPositionService.java的实现描述：岗位 service
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
@FeignClient(url="${feign.userCenterUrl:}", value = "usercenter-service", contextId = "usercenter-app")
public interface SysPositionService {

    @RequestMapping(value = "/sysPosition/save", method = RequestMethod.POST)
    BaseResult save(@RequestBody List<CreatePositionRequestVO> vo);

    @RequestMapping(value = "/sysPosition/getPositionNumByOrgId", method = RequestMethod.POST)
    BaseResult getPositionNumByOrgId(@RequestBody SelectOrgPositionReqVO vo);

    @RequestMapping(value = "/sysPosition/qryPositionListByOrgId", method = RequestMethod.POST)
    BaseResult qryPositionListByOrgId(@RequestBody SelectOrgPositionReqVO vo);

    @RequestMapping(value = "/sysPosition/update/main", method = RequestMethod.POST)
    BaseResult updateMain(@RequestBody UpdatePositionRequestVO vo);

    @RequestMapping(value = "/sysPosition/update/non-main", method = RequestMethod.POST)
    BaseResult updateNonMain(@RequestBody UpdatePositionRequestVO vo);

    @RequestMapping(value = "/sysPosition/delete", method = RequestMethod.POST)
    BaseResult delete(@RequestBody List<Long> vo);

    @RequestMapping(value = "/sysPosition/selectPage", method = RequestMethod.POST)
    BaseResult selectPage(@RequestBody SelectPositionListRequestVO vo);

    @RequestMapping(value = "/sysPosition/qryAllPositions", method = RequestMethod.POST)
    BaseResult qryAllPositions();


    @RequestMapping(value = "/sysPosition/updatePosition", method = RequestMethod.POST)
    BaseResult updatePosition(@Valid UpdatePositionRequestVO vo);

    @RequestMapping(value = "/sysPosition/addPosition", method = RequestMethod.POST)
    BaseResult addPosition(@Valid CreatePositionReqVo vo);

    @RequestMapping(value = "/sysPosition/deletePositionByPosCode", method = RequestMethod.POST)
    BaseResult deletePositionByPosCode(@RequestBody DeletePositionRequestVO deletePositionRequestVO);

    @RequestMapping(value = "/sysPosition/saveOrUpdatePositionForSync", method = RequestMethod.POST)
    BaseResult saveOrUpdatePositionForSync(@RequestBody SavePositionRequestForSyncVO savePositionRequestForSyncVO);

    @RequestMapping(value = "/sysPosition/qryPositionListByOrgIdAndName", method = RequestMethod.POST)
    BaseResult qryPositionListByOrgIdAndName(@RequestBody SelectPositionListRequestVO vo);
}
